package com.henry.imkit.utils

import com.henry.imkit.IMEvent
import com.henry.imkit.IMMessage
import com.henry.imkit.models.Conversation
import com.henry.imkit.models.ConversationData

interface IMRefreshListener {
    fun onRefresh()
    fun onRefreshConversations(conversations: List<Conversation>? = null)
}

interface IMMessageListener {
    fun onNewMessage(messages: List<IMMessage>)
}

interface IMMessageRevokeListener {
    fun onRevokeMessage(message: IMMessage)
}

interface IMConversationInfoListener {
    fun onChangeConversation(conversationId: String)
}

interface IMUserStatusListener {
    fun onForceOffline()
    fun onReConnFailed(code: Int, err: String)
    fun onTokenExpired()
}

interface IMConnListener {
    fun onConnSuccess()
    fun onConnFailed(code: Int, err: String)
    fun onDisconnect(code: Int, err: String)
    fun onConnecting()
}

interface IMEventListener {
    fun onNewEvent(event: IMEvent)
}

interface IMRTCRefreshListener {
    fun onInvite(conversation: ConversationData)
    fun onExit(conversation: ConversationData)
}

interface IMRTCMessageListener {
    fun onNewMessage(messages: List<IMMessage>)
}